// ml:run = $bin < input
// ml:opt = 0
// ml:ccf += -g
#include <iostream>
#include <string>

int a1, a2, a3, a4;

// start of 6s
bool work1()
{
    if (a3 == a4) {
        if (a1 <= a3) return false;
        if (a2 < a3) return false;
        std::string s;
        for (int i = 0; i < a3; i++) s += "68";
        s = std::string(a1 - a3 - 1, '6') + s;
        s += std::string(a2 - a3, '8');
        s += '6';
        std::cout << s << "\n";
        return true;
    }
    if (a3 == a4 + 1) {
        std::string s;
        if (a1 < a3) return false;
        if (a2 < a3) return false;
        for (int i = 0; i < a3; i++) s += "68";
        s = std::string(a1 - a3, '6') + s;
        s += std::string(a2 - a3, '8');
        std::cout << s << "\n";
        return true;
    }
    return false;
}

// start of 8s
bool work2()
{
    if (a3 == a4) {
        std::string s;
        if (a1 < a3) return false;
        if (a2 <= a3) return false;
        for (int i = 0; i < a3; i++) {
            std::string tmp = "86";
            if (i == 0) tmp += std::string(a1 - a3, '6');
            s += tmp;
        }
        s += std::string(a2 - a3, '8');
        std::cout << s << "\n";
        return true;
    }
    if (a4 == a3 + 1) {
        std::string s;
        if (a1 < a4) return false;
        if (a2 < a4) return false;
        for (int i = 0; i < a4; i++) {
            std::string tmp = "86";
            if (i == 0) tmp += std::string(a1 - a4, '6');
            if (i == a4 - 1) tmp = std::string(a2 - a4, '8') + tmp;
            s += tmp;
        }
        std::cout << s << "\n";
        return true;
    }
    return false;
}

int main()
{
    while (std::cin >> a1 >> a2 >> a3 >> a4) {
        if (work1()) continue;
        if (work2()) continue;
        std::cout << "-1\n";
    }
}

